package com.eastfair.datasync.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.datasync.enumeration.UserKafkaAccountStatusEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 用户表
 * </p>
 *
 * @author ligang
 * @since 2023-03-29
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("c_user_kafka_account")
@ApiModel(value = "UserKafkaAccount", description = "用户表")
@AllArgsConstructor
public class UserKafkaAccount extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    @Size(max = 255, message = "头像长度不能超过255")
    @TableField(value = "head_img", condition = LIKE)
    @Excel(name = "头像")
    private String headImg;

    /**
     * 昵称
     */
    @ApiModelProperty(value = "昵称")
    @Size(max = 255, message = "昵称长度不能超过255")
    @TableField(value = "nick_name", condition = LIKE)
    @Excel(name = "昵称")
    private String nickName;

    /**
     * 登录名
     */
    @ApiModelProperty(value = "登录名")
    @Size(max = 64, message = "登录名长度不能超过64")
    @TableField(value = "name", condition = LIKE)
    @Excel(name = "登录名")
    private String name;

    /**
     * 手机区号
     */
    @ApiModelProperty(value = "手机区号")
    @Size(max = 64, message = "手机区号长度不能超过64")
    @TableField(value = "mobile_country_code", condition = LIKE)
    @Excel(name = "手机区号")
    private String mobileCountryCode;

    /**
     * 性別 1男 0女
     */
    @ApiModelProperty(value = "性別 1男 0女")
    @Size(max = 255, message = "性別 1男 0女长度不能超过255")
    @TableField(value = "gender", condition = LIKE)
    @Excel(name = "性別 1男 0女")
    private String gender;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号")
    @Size(max = 16, message = "手机号长度不能超过16")
    @TableField(value = "mobile", condition = LIKE)
    @Excel(name = "手机号")
    private String mobile;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码")
    @Size(max = 256, message = "密码长度不能超过256")
    @TableField(value = "password", condition = LIKE)
    @Excel(name = "密码")
    private String password;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    @Size(max = 64, message = "邮箱长度不能超过64")
    @TableField(value = "email", condition = LIKE)
    @Excel(name = "邮箱")
    private String email;

    /**
     * 状态 #{normal:正常;wait_init:待初始化;forbidden:禁用;waiting:待审核;refuse:拒绝;delete:已删除}
     */
    @ApiModelProperty(value = "状态 #{normal:正常;wait_init:待初始化;forbidden:禁用;waiting:待审核;refuse:拒绝;delete:已删除}")
    @TableField(value = "status")
    @Excel(name = "状态 #{normal:正常;wait_init:待初始化;forbidden:禁用;waiting:待审核;refuse:拒绝;delete:已删除}", replace = {"正常_NORMAL", "待初始化_WAIT_INIT", "禁用_FORBIDDEN", "待审核_WAITING", "拒绝_REFUSE", "已删除_DELETE",  "_null"})
    private UserKafkaAccountStatusEnum status;

    /**
     * 公司id
     */
    @ApiModelProperty(value = "公司id")
    @TableField(value = "company_id")
    @Excel(name = "公司id")
    private Long companyId;

    /**
     * 展商id
     */
    @ApiModelProperty(value = "展商id")
    @TableField(value = "exhibitor_id")
    @Excel(name = "展商id")
    private Long exhibitorId;

    /**
     * 观众id
     */
    @ApiModelProperty(value = "观众id")
    @TableField(value = "visitor_id")
    @Excel(name = "观众id")
    private Long visitorId;

    /**
     * 是否是观众 1是 0否
     */
    @ApiModelProperty(value = "是否是观众 1是 0否")
    @TableField(value = "is_visitor")
    @Excel(name = "是否是观众 1是 0否")
    private Integer isVisitor;

    /**
     * 是否是主办 1是 0否
     */
    @ApiModelProperty(value = "是否是主办 1是 0否")
    @TableField(value = "is_sponsor")
    @Excel(name = "是否是主办 1是 0否")
    private Integer isSponsor;

    /**
     * 是否是员工 1是 0否
     */
    @ApiModelProperty(value = "是否是员工 1是 0否")
    @TableField(value = "is_employee")
    @Excel(name = "是否是员工 1是 0否")
    private Integer isEmployee;

    /**
     * 是否是展商 1是 0否
     */
    @ApiModelProperty(value = "是否是展商 1是 0否")
    @TableField(value = "is_actor")
    @Excel(name = "是否是展商 1是 0否")
    private Integer isActor;

    /**
     * 是否是游客 1是 0否
     */
    @ApiModelProperty(value = "是否是游客 1是 0否")
    @TableField(value = "is_tourist")
    @Excel(name = "是否是游客 1是 0否")
    private Integer isTourist;

    /**
     * 是否启用 1是 0否
     */
    @ApiModelProperty(value = "是否启用 1是 0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用 1是 0否")
    private Integer isEnabled;

    /**
     * 是否删除 1是 0否
     */
    @ApiModelProperty(value = "是否删除 1是 0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除 1是 0否")
    private Integer isDeleted;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 身份证号
     */
    @ApiModelProperty(value = "身份证号")
    @Size(max = 255, message = "身份证号长度不能超过255")
    @TableField(value = "id_card", condition = LIKE)
    @Excel(name = "身份证号")
    private String idCard;

    /**
     * 真实姓名
     */
    @ApiModelProperty(value = "真实姓名")
    @Size(max = 255, message = "真实姓名长度不能超过255")
    @TableField(value = "real_name", condition = LIKE)
    @Excel(name = "真实姓名")
    private String realName;

    /**
     * 是否厦门智慧场馆1是 0否
     */
    @ApiModelProperty(value = "是否厦门智慧场馆1是 0否")
    @TableField(value = "is_p")
    @Excel(name = "是否厦门智慧场馆1是 0否")
    private Integer isP;

    /**
     * 是否场馆业务管理系统1是 0否
     */
    @ApiModelProperty(value = "是否场馆业务管理系统1是 0否")
    @TableField(value = "is_p_venue")
    @Excel(name = "是否场馆业务管理系统1是 0否")
    private Integer isPVenue;

    /**
     * 是否证件管理系统1是 0否
     */
    @ApiModelProperty(value = "是否证件管理系统1是 0否")
    @TableField(value = "is_p_certificate")
    @Excel(name = "是否证件管理系统1是 0否")
    private Integer isPCertificate;

    /**
     * 是否综合-场馆管理1是 0否
     */
    @ApiModelProperty(value = "是否综合-场馆管理1是 0否")
    @TableField(value = "is_p_composite_venue")
    @Excel(name = "是否综合-场馆管理1是 0否")
    private Integer isPCompositeVenue;

    /**
     * 是否综合-主场管理1是 0否
     */
    @ApiModelProperty(value = "是否综合-主场管理1是 0否")
    @TableField(value = "is_p_composite_court")
    @Excel(name = "是否综合-主场管理1是 0否")
    private Integer isPCompositeCourt;

    /**
     * 是否综合-搭建商管理1是 0否
     */
    @ApiModelProperty(value = "是否综合-搭建商管理1是 0否")
    @TableField(value = "is_p_composite_producer")
    @Excel(name = "是否综合-搭建商管理1是 0否")
    private Integer isPCompositeProducer;

    /**
     * 是否综合-主运管理1是 0否
     */
    @ApiModelProperty(value = "是否综合-主运管理1是 0否")
    @TableField(value = "is_p_composite_transport")
    @Excel(name = "是否综合-主运管理1是 0否")
    private Integer isPCompositeTransport;

    /**
     * 是否综合-商旅管理1是 0否
     */
    @ApiModelProperty(value = "是否综合-商旅管理1是 0否")
    @TableField(value = "is_p_composite_trade")
    @Excel(name = "是否综合-商旅管理1是 0否")
    private Integer isPCompositeTrade;

    /**
     * 是否综合-配套商管理1是 0否
     */
    @ApiModelProperty(value = "是否综合-配套商管理1是 0否")
    @TableField(value = "is_p_composite_mating")
    @Excel(name = "是否综合-配套商管理1是 0否")
    private Integer isPCompositeMating;

    /**
     * 是否支付系统1是 0否
     */
    @ApiModelProperty(value = "是否支付系统1是 0否")
    @TableField(value = "is_p_pay")
    @Excel(name = "是否支付系统1是 0否")
    private Integer isPPay;

    /**
     * 是否展商自服务1是 0否
     */
    @ApiModelProperty(value = "是否展商自服务1是 0否")
    @TableField(value = "is_p_exhibitor_self")
    @Excel(name = "是否展商自服务1是 0否")
    private Integer isPExhibitorSelf;

    /**
     * 是否餐饮小程序1是 0否
     */
    @ApiModelProperty(value = "是否餐饮小程序1是 0否")
    @TableField(value = "is_p_cateringapp")
    @Excel(name = "是否餐饮小程序1是 0否")
    private Integer isPCateringapp;

    /**
     * 是否餐饮后台服务1是 0否
     */
    @ApiModelProperty(value = "是否餐饮后台服务1是 0否")
    @TableField(value = "is_p_catering")
    @Excel(name = "是否餐饮后台服务1是 0否")
    private Integer isPCatering;

    /**
     * 是否对外门户-场馆后台1是 0否
     */
    @ApiModelProperty(value = "是否对外门户-场馆后台1是 0否")
    @TableField(value = "is_p_portal_out_venue")
    @Excel(name = "是否对外门户-场馆后台1是 0否")
    private Integer isPPortalOutVenue;

    /**
     * 是否对外门户-运营后台1是 0否
     */
    @ApiModelProperty(value = "是否对外门户-运营后台1是 0否")
    @TableField(value = "is_p_portal_out_operation")
    @Excel(name = "是否对外门户-运营后台1是 0否")
    private Integer isPPortalOutOperation;

    /**
     * 是否内部门户-工作后台1是 0否
     */
    @ApiModelProperty(value = "是否内部门户-工作后台1是 0否")
    @TableField(value = "is_p_portal_in_work")
    @Excel(name = "是否内部门户-工作后台1是 0否")
    private Integer isPPortalInWork;

    /**
     * 是否内部门户-工作app1是 0否
     */
    @ApiModelProperty(value = "是否内部门户-工作app1是 0否")
    @TableField(value = "is_p_portal_in_workapp")
    @Excel(name = "是否内部门户-工作app1是 0否")
    private Integer isPPortalInWorkapp;

    /**
     * 是否智慧运营中心系统1是 0否
     */
    @ApiModelProperty(value = "是否智慧运营中心系统1是 0否")
    @TableField(value = "is_p_operation_center")
    @Excel(name = "是否智慧运营中心系统1是 0否")
    private Integer isPOperationCenter;

    /**
     * 是否访客前台系统1是 0否
     */
    @ApiModelProperty(value = "是否访客前台系统1是 0否")
    @TableField(value = "is_p_visitor_front")
    @Excel(name = "是否访客前台系统1是 0否")
    private Integer isPVisitorFront;

    /**
     * 是否访客后台系统1是 0否
     */
    @ApiModelProperty(value = "是否访客后台系统1是 0否")
    @TableField(value = "is_p_visitor_back")
    @Excel(name = "是否访客后台系统1是 0否")
    private Integer isPVisitorBack;

    /**
     * 配套商ID
     */
    @ApiModelProperty(value = "配套商ID")
    @TableField(value = "mating_id")
    @Excel(name = "配套商ID")
    private Long matingId;

    /**
     * 主运ID
     */
    @ApiModelProperty(value = "主运ID")
    @TableField(value = "transport_id")
    @Excel(name = "主运ID")
    private Long transportId;

    /**
     * 主场ID
     */
    @ApiModelProperty(value = "主场ID")
    @TableField(value = "court_id")
    @Excel(name = "主场ID")
    private Long courtId;

    /**
     * 搭建商ID
     */
    @ApiModelProperty(value = "搭建商ID")
    @TableField(value = "producer_id")
    @Excel(name = "搭建商ID")
    private Long producerId;

    /**
     * 是否业务系统管理员 1是0否
     */
    @ApiModelProperty(value = "是否业务系统管理员 1是0否")
    @TableField(value = "is_admin")
    @Excel(name = "是否业务系统管理员 1是0否")
    private Integer isAdmin;

    /**
     * 是否超级管理员1是0否
     */
    @ApiModelProperty(value = "是否超级管理员1是0否")
    @TableField(value = "is_super_admin")
    @Excel(name = "是否超级管理员1是0否")
    private Integer isSuperAdmin;

    /**
     * 华为IAM用户id
     */
    @ApiModelProperty(value = "华为IAM用户id")
    @Size(max = 255, message = "华为IAM用户id长度不能超过255")
    @TableField(value = "iam_user_id", condition = LIKE)
    @Excel(name = "华为IAM用户id")
    private String iamUserId;

    /**
     * 是否主账号
     */
    @ApiModelProperty(value = "是否主账号")
    @TableField(value = "is_primary_account")
    @Excel(name = "是否主账号")
    private Integer isPrimaryAccount;


    @Builder
    public UserKafkaAccount(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    String headImg, String nickName, String name, String mobileCountryCode, String gender, 
                    String mobile, String password, String email, UserKafkaAccountStatusEnum status, Long companyId, Long exhibitorId, 
                    Long visitorId, Integer isVisitor, Integer isSponsor, Integer isEmployee, Integer isActor, Integer isTourist, 
                    Integer isEnabled, Integer isDeleted, Long tenantId, Long projectId, Long subsystemId, String idCard, 
                    String realName, Integer isP, Integer isPVenue, Integer isPCertificate, Integer isPCompositeVenue, Integer isPCompositeCourt, 
                    Integer isPCompositeProducer, Integer isPCompositeTransport, Integer isPCompositeTrade, Integer isPCompositeMating, Integer isPPay, Integer isPExhibitorSelf, 
                    Integer isPCateringapp, Integer isPCatering, Integer isPPortalOutVenue, Integer isPPortalOutOperation, Integer isPPortalInWork, Integer isPPortalInWorkapp, 
                    Integer isPOperationCenter, Integer isPVisitorFront, Integer isPVisitorBack, Long matingId, Long transportId, Long courtId, 
                    Long producerId, Integer isAdmin, Integer isSuperAdmin, String iamUserId, Integer isPrimaryAccount) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.headImg = headImg;
        this.nickName = nickName;
        this.name = name;
        this.mobileCountryCode = mobileCountryCode;
        this.gender = gender;
        this.mobile = mobile;
        this.password = password;
        this.email = email;
        this.status = status;
        this.companyId = companyId;
        this.exhibitorId = exhibitorId;
        this.visitorId = visitorId;
        this.isVisitor = isVisitor;
        this.isSponsor = isSponsor;
        this.isEmployee = isEmployee;
        this.isActor = isActor;
        this.isTourist = isTourist;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.tenantId = tenantId;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.idCard = idCard;
        this.realName = realName;
        this.isP = isP;
        this.isPVenue = isPVenue;
        this.isPCertificate = isPCertificate;
        this.isPCompositeVenue = isPCompositeVenue;
        this.isPCompositeCourt = isPCompositeCourt;
        this.isPCompositeProducer = isPCompositeProducer;
        this.isPCompositeTransport = isPCompositeTransport;
        this.isPCompositeTrade = isPCompositeTrade;
        this.isPCompositeMating = isPCompositeMating;
        this.isPPay = isPPay;
        this.isPExhibitorSelf = isPExhibitorSelf;
        this.isPCateringapp = isPCateringapp;
        this.isPCatering = isPCatering;
        this.isPPortalOutVenue = isPPortalOutVenue;
        this.isPPortalOutOperation = isPPortalOutOperation;
        this.isPPortalInWork = isPPortalInWork;
        this.isPPortalInWorkapp = isPPortalInWorkapp;
        this.isPOperationCenter = isPOperationCenter;
        this.isPVisitorFront = isPVisitorFront;
        this.isPVisitorBack = isPVisitorBack;
        this.matingId = matingId;
        this.transportId = transportId;
        this.courtId = courtId;
        this.producerId = producerId;
        this.isAdmin = isAdmin;
        this.isSuperAdmin = isSuperAdmin;
        this.iamUserId = iamUserId;
        this.isPrimaryAccount = isPrimaryAccount;
    }

}
